package com.example.apexapp;


import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.util.Log;

class MyBroadcastReceiver extends BroadcastReceiver {

    @Override
    public void onReceive(Context context, Intent intent) {
        //点击通知之后执行操作
        Log.i("TAG", "通知被点击了");
        //点击通知后跳到到百度
        Uri uri = Uri.parse("http://www.baidu.com");
        Intent intent1 = new Intent(Intent.ACTION_VIEW, uri)
                .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);;
        context.startActivity(intent1);
    }

}
